Socket
Socket
Sign inDemoInstall

@aws-cdk/aws-iam

Package Overview
Dependencies
10
Maintainers
4
Versions
288
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aws-cdk/aws-iam

CDK routines for easily assigning correct and minimal IAM permissions


Version published
Weekly downloads
148K
increased by4.49%
Maintainers
4
Created
Weekly downloads
 

Changelog

Source

0.9.2 (2018-09-20)

NOTICE: This release includes a framework-wide breaking change which changes the type of all the string resource attributes across the framework. Instead of using strong-types that extend cdk.Token (such as QueueArn, TopicName, etc), we now represent all these attributes as normal strings, and codify the tokens into the string (using the feature introduced in #168).

Furthermore, the cdk.Arn type has been removed. In order to format/parse ARNs, use the static methods on cdk.ArnUtils.

See motivation and discussion in #695.

Breaking Changes

  • cfn2ts: use stringified tokens for resource attributes instead of strong types (#712) (6508f78), closes #518 #695 #744
  • aws-dynamodb: Attribute type for keys, changes the signature of the addPartitionKey and addSortKey methods to be consistent across the board. (#720) (e6cc189)
  • aws-codebuild: fix typo "priviledged" -> "privileged

Bug Fixes

Features

  • aws-apigateway: new API Gateway Construct Library (#665) (b0f3857)
  • aws-cdk: detect presence of EC2 credentials (#724) (8e8c295), closes #702 #130
  • aws-codepipeline: make the Stage insertion API in CodePipeline more flexible (#460) (d182818)
  • aws-codepipeline: new "Pipeline#addStage" convenience method (#647) (25c9fa0)
  • aws-rds: add support for parameter groups (#729) (2541508), closes #719
  • docs: add documentation for CDK toolkit plugings (#733) (965b918)
  • dependencies: upgrade to jsii 0.7.6

Readme

Source

AWS IAM Construct Library

Define a role and add permissions to it. This will automatically create and attach an IAM policy to the role:

const role = new Role(this, 'MyRole', {
  assumedBy: new ServicePrincipal('sns.amazonaws.com')
});
role.addPermission(new Permission('*', 'lambda:InvokeFunction'));

Define a policy and attach it to groups, users and roles. Note that it is possible to attach the policy either by calling xxx.attachPolicy(policy) or policy.attachToXxx(xxx).

const user = new User(this, 'MyUser', { password: '1234' });
const group = new Group(this, 'MyGroup');

const policy = new Policy(this, 'MyPolicy');
policy.attachToUser(user);
group.attachPolicy(policy);

Managed policies can be attached using xxx.attachManagedPolicy(arn):

const group = new Group(this, 'MyGroup');
group.attachManagedPolicy('arn:aws:iam::aws:policy/AdministratorAccess');

Features

  • Policy name uniqueness is enforced. If two policies by the same name are attached to the same principal, the attachment will fail.
  • Policy names are not required - the CDK logical ID will be used and ensured to be unique.

Keywords

FAQs

Last updated on 20 Sep 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc